package cn.wolfcode.luowowo.search.service.impl;

import cn.wolfcode.luowowo.search.repository.UserInfoEsRepository;
import cn.wolfcode.luowowo.search.service.IUserInfoEsService;
import cn.wolfcode.luowowo.search.template.UserInfoTemplate;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class UserInfoEsServiceImpl implements IUserInfoEsService {

    @Autowired
    private UserInfoEsRepository userInfoEsRepository;

    @Override
    public void saveOrUpdate(UserInfoTemplate template) {
        userInfoEsRepository.save(template);
    }

    @Override
    public List<UserInfoTemplate> findByDestName(String name) {
        return userInfoEsRepository.findByDestName(name);
    }
}
